#ifndef _RAYTRACE_H_
#define _RAYTRACE_H_
#include "vectors.h"
#include "colour.h"
#define TRUE 1
#define FALSE 0

#define min(a,b) (((a) < (b)) ? (a) : (b))

typedef unsigned char bool;


/*
replace r,g,b with diffuse vector, 
make a struct color
add, multiply and coef	color.c
and replace light r,g,b with intensity
*/

typedef struct{
	float ref; /*Reflectivity*/
	float power;
	colour diffuse;
	colour specular;
}material;

typedef struct{
	float r; /*Radius*/
	vector pos; /*center point*/
	int mat;
}sphere;

typedef struct{
	vector start; /*start point*/
	vector dir;	/*end point*/
}ray;

typedef struct{
	vector pos; /*center point*/
	colour intensity;
}light;

/* Function prototypes */
bool intersectRaySphere(ray *ray, sphere *s, float *t);

	

#endif /* _RAYTRACE_H_ */

